<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/header.jsp"%>
<html>
<head>
  <script type="text/javascript">
  /*新增*/
  function addNoticeInf(url){
	  commonDetail(url,"save","noticeInfTableId");
  }
 /* 修改*/
  function modifyNoticeInf(url){
      commonDetail(url,"update","noticeInfTableId");
  }
  /* 发布*/
  function NoticepublishSt1(url){
	  publish(url, "确定要发布吗");
  }
  /* 取消发布*/
  function NoticepublishSt0(url){
	  publish(url, "确定要取消发布吗");
  }
  var grid;
  $(document).ready(function() {
	  grid = $("#noticeInfTableId").jpgrid({
			url: "noticeInfListJson.do",
			columns: [
				{title: "标题", field: "NOTICE_TITLE",width:180},
                {title: "所属机构", field: "INST_NAME",width:230},
                {title: "发布状态", field: "PUBLISH_ST",width:100}
			]
		});
  });
  
  function doSearch() {
	  grid.load({
          notice_title: $('#notice_title').val(),
          publish_st: $('#publish_st').val(),
          ins_cn_nm: $('#ins_cn_nm').val()
	  });
  }
  
  function publish(url, msg){
	  commonAsync(url, "noticeInfTableId", msg, function(result){
		  grid.reload();
	  });
  }
  </script>
</head>
<body class="easyui-layout list_body">
<form id="noticeInfForm" name="noticeInfForm" >
	<div class="list_body_north" data-options="region:'north'" border="false">
	 	<!-- 查询表单 -->
	 	<div  class="datagrid-toolbar" border="false"  >
				<span>标题:</span>
				<input id="notice_title" type="text" name="notice_title"  class="easyui-textbox"  >
				<span>发布状态:</span>
				<code:codeSelect id="publish_st" name="publish_st"  code_type="publish_st" showSelect="true" selectId="${appNoticeInfEntity.publish_st}"></code:codeSelect>
				<span>机构名称:</span>
				<input id="ins_cn_nm" type="text" name="ins_cn_nm"  class="easyui-textbox"  >
			 	<a href="#" class="easyui-linkbutton btn" iconCls="icon-search" onclick="doSearch() ">查询</a>
			 	<a href="#" class="easyui-linkbutton btn" iconCls="icon-reload" onclick="resetForm() ">重置</a>
		</div>
		<!-- 自定义标签工具栏 -->
		<jiepos:buttonOperateTag menuCode="${menuCode}"></jiepos:buttonOperateTag>
	</div>
	<div data-options="region:'center'" border="false" class="list_body_center">
		<!-- 表格 -->
	    <table id="noticeInfTableId" fit="true"></table>
	</div>
</form>
</body>
</html>
